Conversation
Co-authored-by: patak <583075+patak-cat@users.noreply.github.com>
…n/npmx.dev into feat/blog-release-crystal
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughThis PR introduces Bluesky video embed support to blog posts, updates security headers to permit Bluesky video content delivery, fixes OG image handling for nested blog pages, and publishes the npmx 0.11 release announcement post featuring the new embed capabilities. Changesnpmx 0.11 Release with Bluesky Video Embeds
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/global/BlueskyPostEmbed.client.vue (1)
91-91:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winCheck array bounds before accessing by index.
The code accesses
response.posts[0]without verifying that the array contains at least one element. As per coding guidelines, ensure you always check when accessing an array value by index for strict type safety.🛡️ Proposed fix
- return response.posts[0] ?? null + return response.posts.length > 0 ? response.posts[0] : null🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/components/global/BlueskyPostEmbed.client.vue` at line 91, The code returns response.posts[0] without ensuring posts has elements; update the logic that returns the post (the expression using response.posts[0] in BlueskyPostEmbed.client.vue) to first check that response.posts is an array and has length > 0 (e.g., Array.isArray(response.posts) && response.posts.length > 0) then return response.posts[0], otherwise return null; ensure you use the same variable names (response and posts) so type-checkers and callers remain correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/app.vue`:
- Around line 131-141: The top-level if using isBlogPostRoute.value runs only
once at setup so OG image won't update on client-side navigations; change this
to a reactive effect (e.g. use watchEffect or watch(isBlogPostRoute)) that
re-evaluates when route.path/isBlogPostRoute changes and calls defineOgImage
accordingly, or move the defineOgImage call into page-level components so each
page sets its own OG image; ensure you reference the existing isBlogPostRoute
computed and call defineOgImage inside the reactive watcher (and handle/clear
previous OG image if defineOgImage cannot be called multiple times).
In `@app/components/global/BlueskyPostEmbed.client.vue`:
- Around line 198-199: The template is incorrectly binding
post.embed.aspectRatio.width/height to the height and width attributes (creating
tiny pixel dimensions); remove the :height and :width bindings for the embed
element and instead apply a style using CSS aspect-ratio derived from
post.embed.aspectRatio (e.g., set :style to an object like { aspectRatio:
`${post.embed.aspectRatio.width}/${post.embed.aspectRatio.height}` } when
post.embed.aspectRatio exists), mirroring the existing pattern used for
img.aspectRatio elsewhere in BlueskyPostEmbed.client.vue so the embed scales
correctly.
---
Outside diff comments:
In `@app/components/global/BlueskyPostEmbed.client.vue`:
- Line 91: The code returns response.posts[0] without ensuring posts has
elements; update the logic that returns the post (the expression using
response.posts[0] in BlueskyPostEmbed.client.vue) to first check that
response.posts is an array and has length > 0 (e.g.,
Array.isArray(response.posts) && response.posts.length > 0) then return
response.posts[0], otherwise return null; ensure you use the same variable names
(response and posts) so type-checkers and callers remain correct.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cf1f2194-a598-4a65-94fb-5fb79c908103
⛔ Files ignored due to path filters (2)
public/blog/og/release-crystal-chronicle.pngis excluded by!**/*.pngpublic/blog/team-edinburgh.jpgis excluded by!**/*.jpg
📒 Files selected for processing (4)
app/app.vueapp/components/global/BlueskyPostEmbed.client.vueapp/pages/blog/release/crystal-chronicle.mdmodules/security-headers.ts
📚 Description
Since we merged the latest post directly into the release (to avoid rushing testing and to validate the system), I'm creating a PR to sync the branches. I think this is useful from time to time to avoid potential timeline conflicts.